import 'package:flutter/material.dart';
import 'package:flutter_default_project/state_container.dart';

class Stat extends StatelessWidget {
  const Stat({super.key});

  @override
  Widget build(BuildContext context) {
    final stateContainer = StateContainer.of(context);
    return Center(
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text('completed'),
          Text(
            '${stateContainer.completedCount}',
            style: TextStyle(fontSize: 30),
          ),
          SizedBox(height: 20),
          Text('uncompletedCount'),
          Text(
            '${stateContainer.uncompletedCount}',
            style: TextStyle(fontSize: 30),
          ),
        ],
      ),
    );
  }
}
